<?php
require_once 'Messages.php';

class Admin_MessageController extends HTech_Controller_Action
{
    public function init()
    {
        $cfg = array(
            'model' => 'Messages'
        );
        parent::init($cfg);                   
    }
    
    public function browseAction() 
    {
        parent::browseAction();
        $this->view->data = $this->_model->setMessages($this->view->data);
    }
    
    public function viewAction() 
    {
        parent::viewAction();
        $this->redirect(sprintf('/%s/%s/%s/id/%s',
            $this->view->Messages->d->Module,$this->view->Messages->d->Controller,
            $this->view->Messages->d->Action,$this->view->Messages->d->TargetId)); 
    }
}

